package com.moxigua.iotbox.base;

/**
 * Created by junerver on 17-3-9.
 */
public class Constants {

    public static final String METRIC_REQUEST_ONLINE = "RequestOnline"; //-->  settings 测试指定的实验箱是否在线
    public static final String METRIC_RESPONSE_ONLINE = "Online";   //-->remote
    public static final String METRIC_RESPONSE_OFFLINE = "OffOnline";   //-->remote

    public static final String METRIC_REQUEST_MESSAGES = "RequestMessages";  //-->collections 请求指定实验箱的采集节点的所有传感器的信息
    public static final String METRIC_RESPONSE_AIRTEMP = "AirTemp"; //空气温度
    public static final String METRIC_RESPONSE_AIRHUM = "AirHum"; //空气湿度
    public static final String METRIC_RESPONSE_SOLIDTEMP = "SolidTemp";//土壤温度
    public static final String METRIC_RESPONSE_SOLIDHUM = "SolidHum";//土壤湿度
    public static final String METRIC_RESPONSE_LIGHT = "Light";//光照强度

    public static final String METRIC_REQUEST_DEVICE_STATUS = "RequestDeviceStatus"; //请求指定实验箱所有电器设备的状态
    public static final String METRIC_RESPONSE_DEVICE_STATUS = "ResponseDeviceStatus";//响应电器设备装填
    public static final String METRIC_REQUEST_OPERATE = "RequestOperateDevices";//请求操作指定的电器设备

    public static final String METRIC_REQUEST_IMAGE = "RequestImage";    //请求设备拍照
    public static final String METRIC_RESPONSE_IMAGE = "Image";

    public static final String METRIC_REQUEST_ = "";
    public static final String METRIC_RESPONSE_ = "";

    //当前默认的配置
    public static final String DEFAULT_ENDPOINT = "ccit.mqtt.iot.gz.baidubce.com";
    public static final String DEFAULT_USER = "ccit/greenhouse";
    public static final String DEFAULT_PASS = "W0M3GiTGjEz+SeJS6rJ9rSRtvqjm5evqCZSWwb/itJY=";
    public static final int    DEFAULT_COLLECTION_ID = 0;
    //客户端id
    public static final String CLIENT_ID = "Mobile_Client";       //每次只允许登陆一个手机，所以固定就行
    //订阅与发布的主题
    public static final String TOPIC_SUB_REMOTE = "remote";    //app订阅该主题，实验箱通过该主题发布数据
    public static final String TOPIC_PUB_COL = "collections";
    public static final String TOPIC_PUB_DEV = "devices";
    public static final String TOPIC_PUB_SET = "settings";
    public static final String TOPIC_ERR_NOCONFIG = "error_noconfig";   //未配置账号密码
    public static final String TOPIC_ERR_CON_FAILD = "error_connect_faild";     //连接出错
    public static final String TOPIC_NOR_CON_SUC = "connect_success";     //连接出错


    //SP文件使用的key
    public static final String PROTOCOL = "ssl://";
    public static final String PORT = ":1884";   //tcp 1883  TLS 1884  websocket 忘了
    public static final String SP_ENDPOINT = "endpoint";
    public static final String SP_PORT = "port";
    public static final String SP_USER = "user";
    public static final String SP_PASS = "pass";
    public static final String SP_CLIENT_ID = "device_id";  //设备的id

    public static final int DEVICE_ID_HEAD = 1;  //加热 -- 正转
    public static final int DEVICE_ID_WATER = 2; //滴灌
    public static final int DEVICE_ID_LIGHT = 3; //光照
    public static final int DEVICE_ID_WIND = 4;  //通风
    public static final int DEVICE_ID_CURTAIN = 5; //卷帘 -- 反转
    public static final int DEVICE_ID_WATER_PUMP = 6; //
}
